home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
J-M
/
MegaHome II.cpt
/
MegaHome II
/
Preferences
/
card_2837.txt
< prev
next >
Wrap
Text File
|
1990-11-11
|
6KB
|
185 lines
-- card: 2837 from stack: in
-- bmap block id: 0
-- flags: 0000
-- background id: 2633
-- name:
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=16 top=7 right=29 bottom=209
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Restore Saved Preferences
----- HyperTalk script -----
on mouseUp
global userName,id,clickSpeed,autoC,powerUser,dr,coords,mX,screenS
global shiftT,adsI,mHomeVers,vPfA,dragDelay
if mHomeVers is empty then
beep 2
answer"MegaHome is not installed." with "Cancel"
exit mouseUp
end if
answer file "Choose a file from which to restore your Preferences." of type "MHPF"
go to this cd
put it into fn
if fn is empty then exit mouseUp
set the cursor to 4
open file fn
read from file fn for 1
if charToNum(it)<4 or charToNum(it)>5 then
answer "This file is corrupted or was created with an old version of MegaHome Preferences, and can not be used." with "Cancel"
if it is "Cancel" then
close file fn
exit mouseUp
end if
end if
put false into v
if charToNum(it) is 4 then
put "(MegaHome I File)"
put true into v
end if
read from file fn for 1
read from file fn for charToNum(it)-1
put it into userName
read from file fn for 1
get binary(charToNum(it))
set the userLevel to decimal("00000"&(char 1 to 3 of it))
if the version‚â•"1.2" then set the textArrows to (char 4 of it is "1")
set the powerKeys to (char 5 of it is "1")
set the blindTyping to (char 6 of it is "1")
put (char 7 of it is "1") into powerUser
put (char 8 of it is "1") into shiftT
read from file fn for 1
get binary(charToNum(it))
put (decimal("000000"&(char 1 to 2 of it)))+1 into clickSpeed
put (decimal("000000"&(char 3 to 4 of it)))-1 into screenS
put (char 5 of it is "1") into autoC
put (char 6 of it is "1") into mX
put (char 7 of it is "1") into dr
put (char 8 of it is "1") into coords
if v is false then
read from file fn for 1
get binary(charToNum(it))
put (decimal("000000"&(char 1 to 2 of it)))-1 into dragDelay
set the scriptTextSize to (decimal("00"&(char 3 to 8 of it)))
end if
read from file fn for 5
put it-32768 into id
read from file fn for 5
put it-32768 into adsI
if v is false then
read from file fn for 1
read from file fn for charToNum(it)-1
if not fontExists(it,0) then
put "The font “"&it&"” is missing from your system."
get "Monaco"
end if
set the scriptTextFont to it
end if
close file fn
lock screen
push cd
go home
put the textArrows into cd fld "Prefs"
put return&the powerKeys after cd fld "Prefs"
put return&the blindTyping after cd fld "Prefs"
put return&powerUser after cd fld "Prefs"
put return&userName after cd fld "Prefs"
put return&mX after cd fld "Prefs"
put return&coords after cd fld "Prefs"
put return&dr after cd fld "Prefs"
put return&the userLevel after cd fld "Prefs"
put return&clickSpeed after cd fld "Prefs"
put return&id after cd fld "Prefs"
put return&autoC after cd fld "Prefs"
put return&screenS after cd fld "Prefs"
put return&shiftT after cd fld "Prefs"
put return&adsI after cd fld "Prefs"
put return&dragDelay after cd fld "Prefs"
put return&the scriptTextFont&","&the scriptTextSize after cd fld "Prefs"
updMenus
pop cd
hide msg
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=16 top=35 right=57 bottom=209
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Save Current Preferences
----- HyperTalk script -----
on mouseUp
global userName,id,clickSpeed,autoC,powerUser,dr,coords,mX,screenS
global shiftT,adsI,mHomeVers,dragDelay,vPfA
if mHomeVers is empty then
beep 2
answer"MegaHome is not installed." with "Cancel"
exit mouseUp
end if
put newFileName("Save preferences as:","MegaHome Preferences") into fn
go to this card
if fn is empty then exit mouseUp
set the cursor to 4
open file fn
write numToChar(vPfA) to file fn
write numToChar((the number of chars of userName)+1)&userName to file fn
put char 6 to 8 of binary(the userLevel) into bin
if the textArrows is true then put "1" after bin else put "0" after bin
if the powerKeys is true then put "1" after bin else put "0" after bin
if the blindTyping is true then put "1" after bin else put "0" after bin
if powerUser is true then put "1" after bin else put "0" after bin
if shiftT is true then put "1" after bin else put "0" after bin
write binToChar(bin) to file fn
put char 7 to 8 of binary(clickSpeed-1) into bin
put char 7 to 8 of binary(screenS+1) after bin
if autoC is true then put "1" after bin else put "0" after bin
if mX is true then put "1" after bin else put "0" after bin
if dr is true then put "1" after bin else put "0" after bin
if coords is true then put "1" after bin else put "0" after bin
write binToChar(bin) to file fn
put char 7 to 8 of binary(dragDelay+1) into bin
put char 3 to 8 of binary(the scriptTextSize) after bin
write binToChar(bin) to file fn
set the numberFormat to "00000"
set the icon of btn x to id
put the icon of btn x into id
put id+32768 into temp
write temp to file fn
set the icon of btn x to adsI
put the icon of btn x into adsI
put adsI+32768 into temp
write temp to file fn
write numToChar((the number of chars of the scriptTextFont)+1)&the scriptTextFont to file fn
close file fn
get changeFileType(fn,"MHPF","ES01")
end mouseUp
-- part 9 (button)
-- low flags: 80
-- high flags: 0004
-- rect: left=209 top=26 right=38 bottom=221
-- title width / last selected line: 0
-- icon id / first selected line: 1000 / 1000
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x